Optimal. Leaf size=170 \[ \frac{a \left (2 a^2-3 b^2\right ) \cos ^3(c+d x)}{3 d}+\frac{b \left (6 a^2-b^2\right ) \cos ^2(c+d x)}{2 d}-\frac{a \left (a^2-6 b^2\right ) \cos (c+d x)}{d}-\frac{b \left (3 a^2-2 b^2\right ) \log (\cos (c+d x))}{d}-\frac{3 a^2 b \cos ^4(c+d x)}{4 d}-\frac{a^3 \cos ^5(c+d x)}{5 d}+\frac{3 a b^2 \sec (c+d x)}{d}+\frac{b^3 \sec ^2(c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.255129, antiderivative size = 170, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.19, Rules used = {3872, 2837, 12, 948} \[ \frac{a \left (2 a^2-3 b^2\right ) \cos ^3(c+d x)}{3 d}+\frac{b \left (6 a^2-b^2\right ) \cos ^2(c+d x)}{2 d}-\frac{a \left (a^2-6 b^2\right ) \cos (c+d x)}{d}-\frac{b \left (3 a^2-2 b^2\right ) \log (\cos (c+d x))}{d}-\frac{3 a^2 b \cos ^4(c+d x)}{4 d}-\frac{a^3 \cos ^5(c+d x)}{5 d}+\frac{3 a b^2 \sec (c+d x)}{d}+\frac{b^3 \sec ^2(c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3872
Rule 2837
Rule 12
Rule 948
Rubi steps
\begin{align*} \int (a+b \sec (c+d x))^3 \sin ^5(c+d x) \, dx &=-\int (-b-a \cos (c+d x))^3 \sin ^2(c+d x) \tan ^3(c+d x) \, dx\\ &=\frac{\operatorname{Subst}\left (\int \frac{a^3 (-b+x)^3 \left (a^2-x^2\right )^2}{x^3} \, dx,x,-a \cos (c+d x)\right )}{a^5 d}\\ &=\frac{\operatorname{Subst}\left (\int \frac{(-b+x)^3 \left (a^2-x^2\right )^2}{x^3} \, dx,x,-a \cos (c+d x)\right )}{a^2 d}\\ &=\frac{\operatorname{Subst}\left (\int \left (a^4 \left (1-\frac{6 b^2}{a^2}\right )-\frac{a^4 b^3}{x^3}+\frac{3 a^4 b^2}{x^2}+\frac{-3 a^4 b+2 a^2 b^3}{x}-b \left (-6 a^2+b^2\right ) x-\left (2 a^2-3 b^2\right ) x^2-3 b x^3+x^4\right ) \, dx,x,-a \cos (c+d x)\right )}{a^2 d}\\ &=-\frac{a \left (a^2-6 b^2\right ) \cos (c+d x)}{d}+\frac{b \left (6 a^2-b^2\right ) \cos ^2(c+d x)}{2 d}+\frac{a \left (2 a^2-3 b^2\right ) \cos ^3(c+d x)}{3 d}-\frac{3 a^2 b \cos ^4(c+d x)}{4 d}-\frac{a^3 \cos ^5(c+d x)}{5 d}-\frac{b \left (3 a^2-2 b^2\right ) \log (\cos (c+d x))}{d}+\frac{3 a b^2 \sec (c+d x)}{d}+\frac{b^3 \sec ^2(c+d x)}{2 d}\\ \end{align*}
Mathematica [A] time = 0.63709, size = 154, normalized size = 0.91 \[ \frac{-60 a \left (5 a^2-42 b^2\right ) \cos (c+d x)+60 \left (9 a^2 b-2 b^3\right ) \cos (2 (c+d x))-45 a^2 b \cos (4 (c+d x))-1440 a^2 b \log (\cos (c+d x))+50 a^3 \cos (3 (c+d x))-6 a^3 \cos (5 (c+d x))-120 a b^2 \cos (3 (c+d x))+1440 a b^2 \sec (c+d x)+240 b^3 \sec ^2(c+d x)+960 b^3 \log (\cos (c+d x))}{480 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.049, size = 266, normalized size = 1.6 \begin{align*} -{\frac{8\,{a}^{3}\cos \left ( dx+c \right ) }{15\,d}}-{\frac{{a}^{3}\cos \left ( dx+c \right ) \left ( \sin \left ( dx+c \right ) \right ) ^{4}}{5\,d}}-{\frac{4\,{a}^{3}\cos \left ( dx+c \right ) \left ( \sin \left ( dx+c \right ) \right ) ^{2}}{15\,d}}-{\frac{3\,{a}^{2}b \left ( \sin \left ( dx+c \right ) \right ) ^{4}}{4\,d}}-{\frac{3\,{a}^{2}b \left ( \sin \left ( dx+c \right ) \right ) ^{2}}{2\,d}}-3\,{\frac{{a}^{2}b\ln \left ( \cos \left ( dx+c \right ) \right ) }{d}}+3\,{\frac{a{b}^{2} \left ( \sin \left ( dx+c \right ) \right ) ^{6}}{d\cos \left ( dx+c \right ) }}+8\,{\frac{\cos \left ( dx+c \right ) a{b}^{2}}{d}}+3\,{\frac{a{b}^{2} \left ( \sin \left ( dx+c \right ) \right ) ^{4}\cos \left ( dx+c \right ) }{d}}+4\,{\frac{\cos \left ( dx+c \right ) a{b}^{2} \left ( \sin \left ( dx+c \right ) \right ) ^{2}}{d}}+{\frac{{b}^{3} \left ( \sin \left ( dx+c \right ) \right ) ^{6}}{2\,d \left ( \cos \left ( dx+c \right ) \right ) ^{2}}}+{\frac{{b}^{3} \left ( \sin \left ( dx+c \right ) \right ) ^{4}}{2\,d}}+{\frac{{b}^{3} \left ( \sin \left ( dx+c \right ) \right ) ^{2}}{d}}+2\,{\frac{{b}^{3}\ln \left ( \cos \left ( dx+c \right ) \right ) }{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.999803, size = 192, normalized size = 1.13 \begin{align*} -\frac{12 \, a^{3} \cos \left (d x + c\right )^{5} + 45 \, a^{2} b \cos \left (d x + c\right )^{4} - 20 \,{\left (2 \, a^{3} - 3 \, a b^{2}\right )} \cos \left (d x + c\right )^{3} - 30 \,{\left (6 \, a^{2} b - b^{3}\right )} \cos \left (d x + c\right )^{2} + 60 \,{\left (a^{3} - 6 \, a b^{2}\right )} \cos \left (d x + c\right ) + 60 \,{\left (3 \, a^{2} b - 2 \, b^{3}\right )} \log \left (\cos \left (d x + c\right )\right ) - \frac{30 \,{\left (6 \, a b^{2} \cos \left (d x + c\right ) + b^{3}\right )}}{\cos \left (d x + c\right )^{2}}}{60 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.92754, size = 437, normalized size = 2.57 \begin{align*} -\frac{96 \, a^{3} \cos \left (d x + c\right )^{7} + 360 \, a^{2} b \cos \left (d x + c\right )^{6} - 160 \,{\left (2 \, a^{3} - 3 \, a b^{2}\right )} \cos \left (d x + c\right )^{5} - 240 \,{\left (6 \, a^{2} b - b^{3}\right )} \cos \left (d x + c\right )^{4} - 1440 \, a b^{2} \cos \left (d x + c\right ) + 480 \,{\left (a^{3} - 6 \, a b^{2}\right )} \cos \left (d x + c\right )^{3} + 480 \,{\left (3 \, a^{2} b - 2 \, b^{3}\right )} \cos \left (d x + c\right )^{2} \log \left (-\cos \left (d x + c\right )\right ) - 240 \, b^{3} + 15 \,{\left (39 \, a^{2} b - 8 \, b^{3}\right )} \cos \left (d x + c\right )^{2}}{480 \, d \cos \left (d x + c\right )^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.34467, size = 938, normalized size = 5.52 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]